#ifndef INPUTFILE_H
#define INPUTFILE_H

#include <QLineEdit>
#include <QToolButton>
#include "widget_input.h"

class InputFile : public QWidget, public WidgetInput
{
    Q_OBJECT

public:
    InputFile(QWidget *parent = nullptr, const QString& name = "");

    void setFilter(const QString& filter);
    void setAllowEmpty(bool allowEmpty);

    void setValue(const QString& value) override;
    QString getValue() const override;
    bool isEmpty() const override;

protected slots:
    void qToolButton_clicked(bool);

private:
    bool _allowEmpty;
    QString _filter;
    QLineEdit* _qLineEdit;
    QToolButton* _qToolButton;
};

#endif // INPUTFILE_H
